package com.itheima.day06.mydate.test2;

import java.util.Date;

public class Test {
    public static void main(String[] args) {
        // public long getTime() 获取时间对象的毫秒值
        Date d1 = new Date();
        System.out.println(d1.getTime());
        System.out.println(System.currentTimeMillis());
        System.out.println("--------");

        // public void setTime(long time) 设置时间，传递毫秒值
        Date d2 = new Date();
        System.out.println(d2);
        d2.setTime(0L);
        System.out.println(d2);
    }
}
